package com.megan.user.service.impl;

import com.megan.user.dao.user.UserMapper;
import com.megan.user.domain.entity.user.User;
import com.megan.user.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author: megan
 * @mail: meganmail@vip.qq.com
 * @date: 2019/7/9 16:32
 * @version: v1.0
 * @description:
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    public User findById(Integer id) {
        // select * from user where id = #{id}
        return this.userMapper.selectByPrimaryKey(id);
    }

}
